import { ChromeFilled, CrownFilled, SmileFilled, TabletFilled } from '@ant-design/icons';

// 管理员   会员   访客
export default {
  route: {
    path: '/',
    routes: [
      {
        path: '/admin',
        name: '管理页',
        icon: <CrownFilled />,
        access: 'canAdmin',
        component: './Admin',
        meta: ["管理员"],
        routes: [
          {
            path: '/admin/sub-page1',
            name: '一级页面',
            icon: 'https://gw.alipayobjects.com/zos/antfincdn/upvrAjAPQX/Logo_Tech%252520UI.svg',
            component: './Welcome',
            meta: ["管理员"],
          },
          {
            path: '/admin/sub-page2',
            name: '二级页面',
            icon: <CrownFilled />,
            component: './Welcome',
            meta: ["管理员"],
          },
          {
            path: '/admin/sub-page3',
            name: '三级页面',
            icon: <CrownFilled />,
            component: './Welcome',
            meta: ["管理员"],
          },
        ],
      },
      {
        name: '楼盘',
        icon: <TabletFilled />,
        path: '/houses',
        component: './ListTableList',
        meta: ["管理员", "会员"],
        routes: [
          {
            path: '/houses',
            name: '楼盘管理',
            icon: <CrownFilled />,
            meta: ["管理员", "会员"],
            routes: [
              {
                path: 'housesList',
                name: '楼盘列表',
                icon: <CrownFilled />,
                meta: ["管理员", "会员"],
                component: './houses/housesList',
              },
              {
                path: 'sub-sub-page2',
                name: '添加楼盘',
                meta: ["管理员"],
                icon: <CrownFilled />,
                component: './Welcome',
              }
            ]
          }
        ],
      }, 
      {
        name: '客服',
        icon: <SmileFilled />,
        path: '/service',
        component: './service/index',
        meta: ["管理员", "会员"],
        routes: [
          {
            path: 'info',
            name: '客服信息总览',
            icon: <CrownFilled />,
            meta: ["管理员", "会员"],
            component: '/service/info'
          },
          {
            path: 'list',
            name: '客服列表',
            icon: <ChromeFilled />,
            meta: ["管理员", "会员"],
            component: '/service/list'
          },
          {
            path: '/service',
            name: '会话管理',
            icon: <ChromeFilled />,
            meta: ["管理员", "会员"],
            routes: [
              {
                path: 'visitor',
                name: '游客列表',
                icon: <CrownFilled />,
                meta: ["管理员", "会员"],
                component: './service/session/visitor',
              },
              {
                path: 'serviceList',
                name: '服务记录',
                meta: ["管理员", "会员"],
                icon: <CrownFilled />,
                component: './service/session/serviceList',
              },
              {
                path: 'chat',
                name: '聊天记录',
                meta: ["管理员", "会员"],
                icon: <CrownFilled />,
                component: './service/session/chat',
              },
            ]
          },
        ],
      }
    ],
  },
  location: {
    pathname: '/',
  }
};